home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / PEEK.C < prev    next >
Encoding:
Text File  |  1991-08-05  |  355 b   |  12 lines

  1. /* PEEK.C --- p. 647 */
  2. #include <stdio.h>
  3. #include <dos.h>
  4. main()
  5. {
  6.     unsigned seg, off;
  7.     printf("Enter address (SSSS:0000) of memory \n"
  8.                "location whose contents you want to get: ");
  9.     scanf(" %x:%x", &seg, &off);
  10.             /* Use 'peek to get contents of that location */
  11.     printf("The word at %X:%X contains %x\n", seg, off, peek(seg, off));
  12. }